﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<agent02.Model.WEB_SERVICE>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Web Services
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Web Services</h2>

    <table>
        <tr>
            <th>
                Username
            </th>
            <th>
                Password
            </th>
            <th>
                Địa Chỉ WS
            </th>
            <th>
                Trạng Thái
            </th>
            <th>
                Tên Nhà Cung Cấp
            </th>
            <th></th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: item.Username %>
            </td>
            <td>
                <%: item.Password %>
            </td>
            <td>
                <%: item.DiaChiWS %>
            </td>
            <td>
                <%: item.TrangThai %>
            </td>
            <td>
                <%: item.NHA_CUNG_CAP.TenNCC %>
            </td>
            <td>
                <%: Html.ActionLink("Sửa", "Edit", new { id = item.MaWS })%> |
                <%: Html.ActionLink("Chi Tiết", "Details", new { id = item.MaWS })%> |
                <%: Html.ActionLink("Xóa", "Delete", new { id = item.MaWS })%> |
                <%: Html.ActionLink("Nhà Cung Cấp", "Details", "Provider", new { id = item.MaNCC }, "")%>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Tạo Web Service Mới", "Create")%>
    </p>

</asp:Content>

